package net.imain.cloud;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import net.imain.cloud.annotations.MyAnnotations;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 这个类不能被 @ComponentScan | @SpringBootApplication 扫描到
 *
 * @author: uncle
 * @apdateTime: 2017-12-11 15:49
 */
@Configuration
@MyAnnotations
public class RibbonConfig {

//    @Autowired
//    private IClientConfig config;

    @Bean
    public IRule ribbonRule() {
        return new RandomRule(); // 指定随机策略
    }
}